<%--
    Date: 2024-05-22
    用户输入账号和密码登录。
    login.jsp
    └── 登录成功 --> teacherHome.jsp 或 studentHome.jsp
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/login.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-3.7.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/updateTime.js"></script>
    <title>登录页面</title>
</head>

<style>
    body {
        background: url('${pageContext.request.contextPath}/resources/img/bg-ZM-W.jpg') no-repeat center center fixed;
        background-size: cover;
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        position: relative;
    }
</style>

<body>
<div class="overlay"></div>
<div class="top-bar">
    <span id="currentTime"></span>
    <span class="welcome-msg">欢迎使用成绩管理系统，请登录</span>
</div>
<div class="container">
    <div class="login-box">
        <h2>登录</h2>
        <c:if test="${not empty msg}">
            <p class="error-msg">${msg}</p>
        </c:if>
        <form method="post" action="<c:url value='/login'/>">
            用户名：<input type="text" id="username" name="username" placeholder="用户名" required>
            密码：<input type="password" id="password" name="password" placeholder="密码" required>
            <div class="button-group">
                <input type="submit" value="提交">
                <input type="reset" value="重置">
            </div>
        </form>
    </div>
</div>
</body>
</html>
